import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);
const routes = [
  // 登录 
  {
    path: "/",
    name: "logins",
    component: () => import("../views/Logins"),
  },
  {
    path: "/logins",
    name: "logins",
    component: () => import("../views/Logins"),
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/Login"),
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/About"),
  },
  // 首页
  {
    path: "/home",
    name: "home",
    component: () => import("../views/Home"),
    
    children:[ 
      {
        path: "/analysis",
        name: "analysis",
        component: () => import("../views/deeps/Analysis"),
      },
      {
        path: "/dish",
        name: "dish",
        component: () => import("../views/deeps/Dish"),
      },
      {
        path: "/employee",
        name: "employee",
        component: () => import("../views/deeps/Employee"),
      },
      {
        path: "/list",
        name: "list",
        component: () => import("../views/deeps/List"),
      },
      {
        path: "/order",
        name: "order",
        component: () => import("../views/deeps/Order"),
      },
      {
        path: "/404",
        name:"404",
        component:()=>import("../views/deeps/404"),
      },
      // {
      //   path: "/dataanalysis",
      //   name:"dataanalysis",
      //   component:()=>import("../views/child/DataAnalysis"),
      // },
      // {
      //   path: "/orderlist",
      //   name:"orderlist",
      //   component:()=>import("../views/child/OrderList"),
      // },
      // {
      //   path: "/upload",
      //   name:"upload",
      //   component:()=>import("../views/child/Upload"),
      // },
    ]
  }
];

const router = new VueRouter({
  routes,
});

export default router;